<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="author" content="贾文清">
    <title></title>
    <style>
    *{
        box-sizing: border-box;
    }
    ul{
        margin: 0;
        padding: 0;
        list-style: none;
    }
    p,h2{
        margin: 0;
    }
    .box{
        width: 190px;
        margin: 0 auto;
        border: 1px solid #ccc;
    }
    h2{
        height: 30px;
        line-height: 30px;
        background-color: #eee;
        text-align: center;
        font-size: 22px;
        font-weight: normal;
    }
    li{
        width: 180px;
        height: 150px;
        margin: 5px;
        overflow: hidden;
        position: relative;
    }
    .img-box{
        width: 360px;
        height: 150px;
        /* background-color: red; */
        display: flex;
        position: absolute;
        left: 0;
        top: 0;
    }
    .text-box{
        width: 180px;
        height: 40px;
        
        position: absolute;
        left: 0;
        bottom: -20px;
    }
    .text-box p{
        width: 180px;
        height: 20px;
        text-align: center;
        line-height: 20px;
        color: white;
        background-color: lightcoral;
        position: absolute;
        left: 0;
        top: 0;
    }
    .text-box p:last-child{
        top: 20px;
    }
    </style>
</head>
<body>
    <div class="box">
        <h2>专辑推荐</h2>
        <ul>
            <li>
                <div class="img-box">
                    <img src="./img/1.jpg" alt="">
                    <img src="./img/2.jpg" alt="">
                </div>
                <div class="text-box">
                    <p>简弘亦~小幸运</p>
                    <p>简弘亦~问</p>
                </div>
            </li>
            <li>
                <div class="img-box">
                    <img src="./img/3.jpg" alt="">
                    <img src="./img/4.jpg" alt="">
                </div>
                <div class="text-box">
                    <p>简弘亦~天问</p>
                    <p>简弘亦~伤心花</p>
                </div>
            </li>
            <li>
                <div class="img-box">
                    <img src="./img/5.jpg" alt="">
                    <img src="./img/6.jpg" alt="">
                </div>
                <div class="text-box">
                    <p>简弘亦~群居动物</p>
                    <p>简弘亦~我好想你</p>
                </div>
            </li>
        </ul>
    </div>

    <script src="jquery.js"></script>
</body>
</html>
<script>
    // 事件中找标签
    // 1. this  2. index
    $('.box li').hover(function(){
        $(this).find('.img-box').stop().animate({left:-180},500);
        $(this).find('p').eq(0).animate({top:20},500);
        $(this).find('p').eq(1).animate({top:0},500);
    },function(){
        $(this).find('.img-box').stop().animate({left:0},500);
        $(this).find('p').eq(0).animate({top:0},500);
        $(this).find('p').eq(1).animate({top:20},500);
    });

</script>